import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta:{
      title:"首页",
      isShowNav:false,
      isShowTab:true,
    }
  },{
    path: '/cate',
    name: 'Cate',
    component: () => import('../views/Cate.vue'),
    meta:{
      title:"分类",
      isShowNav:false,
      isShowTab:true,
    }
  },{
    path: '/car',
    name: 'Car',
    component: () => import('../views/Car.vue'),
    meta:{
      title:"购物车",
      isShowNav:true,
      isShowTab:false,
    }
  },
  {
    path: '/mine',
    name: 'Mine',
    component: () => import('../views/Mine.vue'),
    meta:{
      title:"我的",
      isShowNav:false,
      isShowTab:true,
    }
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login.vue'),
    meta:{
      title:"我的",
      isShowNav:false,
      isShowTab:false,
    }
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import('../views/Register.vue'),
    meta:{
      title:"我的",
      isShowNav:false,
      isShowTab:false,
    }
  },
  {
    path: '/address',
    name: 'Address',
    component: () => import('../views/Address.vue'),
    meta:{
      title:"地址",
      isShowNav:true,
      isShowTab:false,
    }
  },
  {
    path:'/bargainList',
    name:'BargainList',
    component:()=>import("../views/bargain/BargainList.vue"),
    meta:{
      isShowNav:true,
      isShowTab:false,
      title:"全民砍价"
    } 
  },
  {
    path:'/scrollList',
    name:'ScrollList',
    component:()=>import("../views/scroll/ScrollList.vue"),
    meta:{
      isShowNav:true,
      isShowTab:false,
      title:"精选专题"
    } 
  },
  {
    path:'/scrollDetail',
    name:'ScrollDetail',
    component:()=>import("../views/scroll/ScrollDetail.vue"),
    meta:{
      isShowNav:true,
      isShowTab:false,
      title:"专栏详情"
    } 
  },
  {
    path:'/recommendDetail',
    name:'RecommendDetail',
    component:()=>import("../views/recommend/RecommendDetail.vue"),
    meta:{
      isShowNav:false,
      isShowTab:false,
    } 
  },
  ,{
    path: '/about',
    name: 'About',
    component: () => import('../views/About.vue'),
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
